package org.mzx.shortLink.adminn.remoteApi.workkApi;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.mzx.shortLink.adminn.remoteApi.dto.Request.recycleBinAddDtoReq;
import org.mzx.shortLink.adminn.remoteApi.dto.Response.ShortLinkRecycleBinPageReqDTO;
import org.mzx.shortLink.adminn.remoteApi.dto.Response.TLinkPageDtoResp;
import org.mzx.shortLink.starter.convention.Result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author mazhenxi
 * @date 2025/5/8
 */
@ComponentScan
@FeignClient(name = "short-link-wrok",contextId = "recycleBin")
public interface feignRecycleBinApi {
    /**
     *
     * @param requestParam
     * @return
     */
    @PostMapping("/api/short-link/v1/recycle-bin/save")
    Result<Void> saveRecycleBin(recycleBinAddDtoReq requestParam);


    /**
     * 分页查询回收站短链接
     * @param requestParam
     * @return
     */
    @GetMapping("/api/short-link/v1/recycle-bin/page")
    Result<Page<TLinkPageDtoResp>> pageShortLink(ShortLinkRecycleBinPageReqDTO requestParam);

    /**
     * 恢复短链接
     * @param requestParam
     * @return
     */
    @PostMapping("/api/short-link/v1/recycle-bin/recover")
    Result<Void> recoverRecycleBin(@RequestBody recycleBinAddDtoReq requestParam);

    /**
     * 移除短链接
     * @param requestParam
     * @return
     */
    @PostMapping("/api/short-link/v1/recycle-bin/remove")
    Result<Void> removeRecycleBin(@RequestBody recycleBinAddDtoReq requestParam);
}
